import java.util.Scanner;

/**
 * 判断邮箱是否合法
 */
public class EmailQualify {
    public void emailQualify(){
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";
        if( str.matches(emailMatcher)){
            System.out.println("合格");
        }else{
            System.out.println("不合格");
        }
    }
}
